# Header
snippet head
	/* *************** ${1:name} **************** */
	/*										      */	
	/*                                            */
	/*                                            */
	/*                                            */
	/*                                            */
	/*                                            */
	/*                                            */
	/* ******************* $1 ******************* */
	${3}
# Read File Into Vector
snippet readfile
	std::vector<char> v;
	if (FILE *${2:fp} = fopen(${1:"filename"}, "r")) {
		char buf[1024];
		while (size_t len = fread(buf, 1, sizeof(buf), $2))
			v.insert(v.end(), buf, buf + len);
		fclose($2);
	}${3}
# std::map
snippet map
	std::map<${1:key}, ${2:value}> map${3};${4}
# std::vector
snippet ve
	std::vector<${1:char}> v${2};${3}
# Using Namespace
snippet us
	using namespace ${1:std};${2}
# Namespace
snippet na
	namespace ${1:`Filename('', 'my')`} {
		${2}
	} /* $1 */
# Class
snippet cl
	class ${1:`Filename('$1_t', 'name')`} {
	public:
		$1 (${2:arguments});
		virtual ~$1 ();
	
	private:
		${3:/* data */}
	};
# cout
snippet co
	cout << "${1:var}: " << $1 << endl;${2}
# cin
snippet ci
	cin >> ${1};${2}
snippet cig
	cin.getline(${1});${2}

# TopCoder Stuff

# Types
snippet ui
	unsigned int ${1:ui};${2}
snippet ul
	unsigned long int ${1:ul};${2}
snippet ull
	unsigned long long int ${1:ull};${2}
snippet li
	long int ${1:li};${2}
snippet ll
	long long int ${1:ll};${2}
snippet ld
	long double ${1:ld};${2}
snippet pii
	pair<int,int> ${1:pii};${2}
snippet vpii
	vector< pair<int,int> > ${1:vpii};${2}
snippet vi
	vector<int> ${1:vi};${2}
snippet vs
	vector<string> ${1:vi};${2}
snippet iss
	istringstream ${1:iss};${2}
snippet oss
	ostringstream ${1:oss};${2}

# Freq
snippet te
	template<typename ${1:T}>${2}
snippet f
	first${1}
snippet s
	second${1}
snippet mp
	make_pair(${1})${2}
snippet pb
	push_back(${1});${2}
snippet pf
	push_front(${1});${2}
snippet all
	${1:X}.begin(),$1.end()${2}
snippet si
	(int)(${1}).size()${2}

# For Each
snippet fore
	for (__typeof((${1:X}).begin()) ${2:it} = ($1).begin(); $2 != ($1).end(); $2++) {
		${3:/* code */}
	}
